<%= render :partial => 'messages' %>

<% unless @duration.nil? %>
<%= error_messages_for 'duration' %>
<% end %>